#include <iostream>
using namespace std;
int left_num=0;
int fenyezi(int num)
{   int n=1,left_num=num;
    for(n;!((left_num-1)%5);n++){
    left_num=(left_num-1)/5*4;}
    return n;
}
int main()
{  
    int n=1;
    int num=0;
    int left_num_10;
    for(num;n<=5;num++)
    {
        n=fenyezi(num);
    }
    cout<<num;
    return 0;

    
}

